package com.zhongyu.comm.vo;

public class Result {

    private boolean success;
    private String errorCode;
    private String msg;
    private Object data;

    public static Result success(Object data){
        Result result = new Result();
        result.setErrorCode("2000");
        result.setSuccess(true);
        return result;
    }

    public static Result failure(String msg){
        Result result = new Result();
        result.setErrorCode("5000");
        result.setSuccess(false);
        result.setMsg(msg);
        return result;
    }


    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
